package com.blocks57.homework.repository;

import com.blocks57.homework.model.ShoppingCartItem;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * ShoppingCartItemRepository
 *
 * @author Tom at 2023-10-29
 */
public interface ShoppingCartItemRepository extends JpaRepository<ShoppingCartItem, Long> {
    List<ShoppingCartItem> findByUserId(Long userId);
    List<ShoppingCartItem> findByUserIdAndProductId(Long userId, Long productId);
    List<ShoppingCartItem> findByUserIdAndShoppingCartItemId(Long userId, Long shoppingCartItemId);
}
